package cn.yunhe.controller;

import cn.yunhe.entity.Department;
import cn.yunhe.service.impl.DepartmentServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class DepartmentController {

    @Resource
    private DepartmentServiceImpl departmentService;

    @RequestMapping("getAllDep")
    public List<Department> getAllDep(){
        return departmentService.getAllDep();
    }

    public DepartmentServiceImpl getDepartmentService() {
        return departmentService;
    }

    public void setDepartmentService(DepartmentServiceImpl departmentService) {
        this.departmentService = departmentService;
    }
}
